Skip to content

[PW_SID:1070303] riscv: Fix memory leak in apply_relocate_add#1653

Open
linux-riscv-bot wants to merge 1 commit intoworkflow__riscv__fixesfrom
pw1070303
Open

[PW_SID:1070303] riscv: Fix memory leak in apply_relocate_add#1653
linux-riscv-bot wants to merge 1 commit intoworkflow__riscv__fixesfrom
pw1070303

Conversation

@linux-riscv-bot
Copy link

PR for series 1070303 applied to workflow__riscv__fixes

Name: riscv: Fix memory leak in apply_relocate_add
URL: https://patchwork.kernel.org/project/linux-riscv/list/?series=1070303
Version: 1

The error path in apply_relocate_add() forgets to clean up the hashtable
allocated at the beginning. But we should not use
process_accumulated_relocations() as a cleanup function because some
entries may be half-finished, and we cannot write incorrect values back
to memory.

So, add cleanup_accumulated_relocations() for freeing all memory
allocated in the error paths.

Fixes: 8fd6c51 ("riscv: Add remaining module relocations")
Signed-off-by: Zishun Yi <vulab@iscas.ac.cn>
Signed-off-by: Linux RISC-V bot <linux.riscv.bot@gmail.com>
@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Fix memory leak in apply_relocate_add"
build-rv32-defconfig
Desc: Builds riscv32 defconfig
Duration: 138.11 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Fix memory leak in apply_relocate_add"
build-rv64-clang-allmodconfig
Desc: Builds riscv64 allmodconfig with Clang, and checks for errors and added warnings
Duration: 1115.97 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Fix memory leak in apply_relocate_add"
build-rv64-gcc-allmodconfig
Desc: Builds riscv64 allmodconfig with GCC, and checks for errors and added warnings
Duration: 1634.45 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Fix memory leak in apply_relocate_add"
build-rv64-nommu-k210-defconfig
Desc: Builds riscv64 defconfig with NOMMU for K210
Duration: 26.87 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Fix memory leak in apply_relocate_add"
build-rv64-nommu-k210-virt
Desc: Builds riscv64 defconfig with NOMMU for the virt platform
Duration: 27.99 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Fix memory leak in apply_relocate_add"
checkpatch
Desc: Runs checkpatch.pl on the patch
Duration: 0.82 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Fix memory leak in apply_relocate_add"
dtb-warn-rv64
Desc: Checks for Device Tree warnings/errors
Duration: 83.60 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Fix memory leak in apply_relocate_add"
header-inline
Desc: Detects static functions without inline keyword in header files
Duration: 0.22 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Fix memory leak in apply_relocate_add"
kdoc
Desc: Detects for kdoc errors
Duration: 1.07 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Fix memory leak in apply_relocate_add"
module-param
Desc: Detect module_param changes
Duration: 0.24 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Fix memory leak in apply_relocate_add"
verify-fixes
Desc: Verifies that the Fixes: tags exist
Duration: 0.27 seconds
Result: PASS

@linux-riscv-bot
Copy link
Author

Patch 1: "riscv: Fix memory leak in apply_relocate_add"
verify-signedoff
Desc: Verifies that Signed-off-by: tags are correct
Duration: 0.29 seconds
Result: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants